package com.ljx.itbbs.server.user.dao;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ljx.itbbs.server.user.domain.entity.RolePermsRelationEntity;
import com.ljx.itbbs.server.user.mapper.RolePermsRelationMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 角色权限关联表 服务实现类
 * </p>
 *
 * @author LiJunXi
 * @since 2024-03-02
 */
@Service
public class RolePermsRelationDao extends ServiceImpl<RolePermsRelationMapper, RolePermsRelationEntity> {

    public void deleteRolePermsByRoleId(Long roleId) {
        this.baseMapper.delete(new LambdaQueryWrapper<RolePermsRelationEntity>()
                .eq(RolePermsRelationEntity::getRoleId, roleId));
    }

}
